package school.xauat.现代密码学.对称加密;

import com.sun.org.apache.xerces.internal.impl.dv.util.Base64;

import java.io.UnsupportedEncodingException;

/**
 * @author ：zsy
 * @date ：Created 2021/6/17 10:52
 * @description：测试Base64
 */
public class TestBase64Demo {
    public static void main(String[] args) throws UnsupportedEncodingException {
        System.out.println(Base64.encode("1".getBytes()));//MQ==
        System.out.println(Base64.encode("12".getBytes()));//MTI=
        System.out.println(Base64.encode("123".getBytes()));//MTIz
        System.out.println(Base64.encode("网络安全".getBytes()));//572R57uc5a6J5YWo
    }
}
